home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
gnu
/
include
/
incl98.zoo
/
linea.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-10
|
40KB
|
1,039 lines
/*
* Common include file for C interface to low level Line A calls
*
* ++jrb bammi@cadence.com
*/
#ifndef _LINEA_H
#define _LINEA_H
#ifndef _COMPILER_H
#include <compiler.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*****************************************************************************\
* *
* Defines *
* *
\*****************************************************************************/
/*
* Object colors (default pallette)
*
*/
#define WHITE 0
#define BLACK 1
#define RED 2
#define GREEN 3
#define BLUE 4
#define CYAN 5
#define YELLOW 6
#define MAGENTA 7
#define LWHITE 8
#define LBLACK 9
#define LRED 10
#define LGREEN 11
#define LBLUE 12
#define LCYAN 13
#define LYELLOW 14
#define LMAGENTA 15
/*
* Vdi writing modes
*
*/
#define MD_REPLACE 1
#define MD_TRANS 2
#define MD_XOR 3
#define MD_ERASE 4
/*
* Raster Op Codes
*
*/
#define ALL_WHITE 0
#define S_AND_D 1
#define S_AND_NOTD 2
#define S_ONLY 3
#define NOTS_AND_D 4
#define D_ONLY 5
#define S_XOR_D 6
#define S_OR_D 7
#define NOT_SORD 8
#define NOT_SXORD 9
#define D_INVERT 10
#define NOT_D 10
#define S_OR_NOTD 11
#define NOT_S 12
#define NOTS_OR_D 13
#define NOT_SANDD 14
#define ALL_BLACK 15
/*
* Sprite formats
*
*/
#define SP_VDI 0
#define SP_XOR 1
/*
* Line A Opcodes
*
*/
#define INIT 0
#define PUTPIXEL 1
#define GETPIXEL 2
#define LINE 3
#define HLINE 4
#define RECTANGLE 5
#define FPOLYGON 6
#define BITBLT 7
#define TEXTBLT 8
#define SHOWMOUSE 9
#define HIDEMOUSE 10
#define TRANMOUSE 11
#define USPRITE 12
#define DSPRITE 13
#define CPYRASTER 14
#define FSEEDFILL 15 /* ROM TOS only */
/*****************************************************************************\
* *
* Types *
* *
\*****************************************************************************/
/*
* Global Variables at negative offsets from the Line A parameter
* block address returned by init. (I have no way of telling if this
* list is complete).
*
*/
/* Name Offset Type Description */
/* --------------------------------------------------------------------------*/
/* V_BYTES_LIN -2 W bytes/line for font */
/* V_Y_MAX -4 W Max Y pixel value of the screen */
/* V_STATUS -6 W Text Status byte */
/* Bit Field Zero One */
/* 0 cursor flash disabled enabled */
/* 1 flash state off on */
/* 2 cursor visible no yes */
/* 3 end of line no-wrap wrap */
/* 4 inverse video on off */
/* 5 cursor saved false true */
/* V_OFF_AD -10 L Font offset table address */
/* V_X_MAX -12 W Max X pixel value */
/* V_FNT_WR -14 W Width of Font Form in bytes (see type FONT below) */
/* V_FNT_ST -16 W First font ASCII code (first_ade) */
/* V_FNT_ND -18 W Last font ASCII code (last_ade ) */
/* V_FNT_AD -22 L Font Form address */
/* Mono Spaced, 8 pixels wide and byte aligned, any ht. */
/* V_CUR_TIM -23 B Cursor countdown timer */
/* V_CUR_CNT -24 B Cursor flash interval( in frames) */
/* V_CUR_CY -26 W Y cursor position */
/* V_CUR_CX -28 W X cursor position */
/* V_CUR_OFF -30 W Offset from screen base to first cell (bytes) */
/* V_CUR_AD -34 L Current cursor address */
/* V_COL_FG -36 W Foreground color index */
/* V_COL_BG -38 W Background color index */
/* V_CEL_WR -40 W Offset to next vertical cell (bytes) */
/* V_CEL_MY -42 W Max cells high - 1 */
/* V_CEL_MX -44 W Max cells across - 1 */
/* V_CEL_HT -46 W Cell height in pixels (font form's height) */
/* --------------------------------------------------------------------------*/
/*
* Atari finally named these variables
* so here they are
*
*/
#define V_CEL_HT (*((short *)((char *)__aline + -46L)))
#define V_CEL_MX (*((short *)((char *)__aline + -44L)))
#define V_CEL_MY (*((short *)((char *)__aline + -42L)))
#define V_CEL_WR (*((short *)((char *)__aline + -40L)))
#define V_COL_BG (*((short *)((char *)__aline + -38L)))
#define V_COL_FG (*((short *)((char *)__aline + -36L)))
#define V_CUR_AD (*((char **)((char *)__aline + -34L)))
#define V_CUR_OFF (*((short *)((char *)__aline + -30L)))
#define V_CUR_CX (*((short *)((char *)__aline + -28L)))
#define V_CUR_CY (*((short *)((char *)__aline + -26L)))
#define V_CUR_CNT (*((char *)((char *)__aline + -24L)))
#define V_CUR_TIM (*( ((char *)__aline + -23L)))
#define V_FNT_AD (*((char **)((char *)__aline + -22L)))
#define V_FNT_ND (*((short *)((char *)__aline + -18L)))
#define V_FNT_ST (*((short *)((char *)__aline + -16L)))
#define V_FNT_WR (*((short *)((char *)__aline + -14L)))
#define V_X_MAX (*((short *)((char *)__aline + -12L)))
#define V_OFF_AD (*((char **)((char *)__aline + -10L)))
#define V_STATUS (*((short *)((char *)__aline + -6L)))
#define V_Y_MAX (*((short *)((char *)__aline + -4L)))
#define V_BYTES_LIN (*((short *)((char *)__aline + -2L)))
/* more obscure variables again found at negative offset */
/* pointer to current font */
#define CUR_FONT (*((__FONT **)((char *)__aline + -906L)))
/* Mouse X hot spot */
#define M_POS_HX (*((short *)((char *)__aline + -856L)))
/* Mouse Y hot spot */
#define M_POS_HY (*((short *)((char *)__aline + -854L)))
/* writing mode for mouse */
#define M_PLANES (*((short *)((char *)__aline + -852L)))
/* mouse bkgd color */
#define M_CDB_BG (*((short *)((char *)__aline + -850L)))
/* mouse fgd color */
#define M_CDB_FG (*((short *)((char *)__aline + -848L)))
/* mous form, 32 words alternating words: bkgd-0, fgd-0 ... bkgd-15 fgd-16 */
#define MASK_FORM ((short *)((char *)__aline + -846L))
/* 45 words of vq_extnd */
#define INQ_TAB ((short *)((char *)__aline + -782L))
/* 45 words of v_opnwk */
#define DEV_TAB ((short *)((char *)__aline + -692L))
/* current mous X */
#define GCURX (*((short *)((char *)__aline + -602L)))
/* current mous Y */
#define GCURY (*((short *)((char *)__aline + -600L)))
/* current mous hide cnt */
#define M_HID_CT (*((short *)((char *)__aline + -598L)))
/* mous button stat, bit0 = left, 1 = right, 0=up, 1=down */
#define MOUSE_BT (*((short *)((char *)__aline + -596L)))
/* 3*16 words of vq_color */
#define REQ_COL ((short *)((char *)__aline + -594L))
/* 15 words containing text, line and marker sizes in dev coords
0 min char width
1 min char height
2 max char width
3 max char height
4 min line width
5 reserved
6 max line width
7 reserved
8 min marker width
9 min marker height
10 max marker width
11 max marker height
12-14 RESERVED */
#define SIZ_TAB ((short *)((char *)__aline + -498L))
/* Pointer to current virtual workstation attributes */
#define CUR_WORK (*((short **)((char *)__aline + -464L)))
/* -> default font hdr */
#define DEF_FONT (*((__FONT **)((char *)__aline + -460L)) )
/* FONT_RING is an array of four longword pointers to linked lists of
font headers. The first entry is the head pointer to the font list,
the second and third are continuation fields, and the fourth is a null
terminator. */
#define FONT_RING ((short *)((char *)__aline + -456L))
/* Number of fonts in the FONT_RING lists */
#define FONT_COUNT (*((short *)((char *)__aline + -440L)))
/* Mouse status
Bit 0 = left mouse button status (0=up, 1=down)
Bit 1 = right mouse button status (0=up, 1=down)
Bit 2 = reserved